/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: #fff;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.logo h1:hover {
    transform: scale(1.05);
}

.search-box {
    display: flex;
    gap: 0.5rem;
    flex: 0 1 400px;
    position: relative;
}

.search-box input {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-box button {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.search-box button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-links a:hover::before {
    transform: translateX(0);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* 主要内容区域样式 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 80px; /* 为固定导航栏留出空间 */
    margin-bottom: 2rem;
}

/* 分类样式 */
.categories {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.categories ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.categories a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.categories a:hover {
    background-color: #4CAF50;
    color: white;
}

/* 商品网格样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.2);
}

.product-card h3 {
    margin: 1rem 0;
}

.product-card .price {
    color: #e44d26;
    font-weight: bold;
    font-size: 1.2rem;
}

.product-card button {
    width: 100%;
    padding: 0.5rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

/* 商品列表样式优化 */
.products-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.products-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

#productList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 1rem;
}

.product-card .price {
    color: #e74c3c;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0 1rem;
}

.product-card button {
    width: calc(100% - 2rem);
    margin: 1rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
}

/* 结算模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

.checkout-info {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.delivery-info {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-items {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-total {
    text-align: right;
    font-weight: bold;
    font-size: 1.3em;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.confirm-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.confirm-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 结算商品列表样式 */
#checkoutItems {
    margin-top: 15px;
}

.checkout-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.checkout-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.checkout-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-title {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #333;
}

.checkout-item-price {
    color: #e74c3c;
    font-weight: 500;
}

.checkout-item-quantity {
    color: #666;
    margin-left: 15px;
}

/* 暗色主题适配 */
[data-theme="dark"] .checkout-item {
    border-bottom-color: #34495e;
}

[data-theme="dark"] .checkout-item-title {
    color: #ecf0f1;
}

[data-theme="dark"] .checkout-item-quantity {
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .checkout-item img {
        width: 50px;
        height: 50px;
    }

    .checkout-item-title {
        font-size: 0.9rem;
    }
}

/* 购物车样式优化 */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 0 1rem;
}

.cart-item {
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.cart-item img {
    width: 80px;
    height: 80px;
}

.cart-item-title {
    font-size: 1.1rem;
}

.cart-item-price {
    font-size: 1.1rem;
}

.cart-item-quantity {
    margin: 0 0.8rem;
    padding: 0.3rem;
}

.quantity-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
}

.quantity-input {
    width: 45px;
    padding: 0.3rem;
    font-size: 0.9rem;
}

.cart-summary {
    padding: 1rem;
    margin-top: 1rem;
}

.total {
    font-size: 1.3rem;
}

.checkout-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

/* 订单列表样式优化 */
.order-list {
    max-height: 500px;
    overflow-y: auto;
}

.order-item {
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.order-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.order-info {
    gap: 0.5rem;
}

.order-number {
    font-size: 1.1rem;
}

.order-date {
    font-size: 0.9rem;
}

.order-status {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
}

.order-product {
    padding: 0.8rem 0;
}

.order-product img {
    width: 70px;
    height: 70px;
}

.order-product-name {
    font-size: 1.1rem;
}

.order-product-price {
    font-size: 0.9rem;
}

.order-footer {
    margin-top: 1rem;
    padding-top: 1rem;
}

.order-address {
    font-size: 0.9rem;
}

.order-total {
    font-size: 1.1rem;
}

/* 个人信息样式优化 */
.profile-info {
    margin: 1rem 0;
}

.info-group {
    margin: 0.8rem 0;
    padding: 0.6rem;
}

.profile-actions {
    gap: 1rem;
    margin-top: 1rem;
}

.profile-actions button {
    padding: 0.8rem;
    font-size: 1rem;
}

/* 登录状态样式 */
.nav-links .logged-in {
    display: none;
}

.nav-links .logged-out {
    display: inline-block;
}

body.logged-in .nav-links .logged-in {
    display: inline-block;
}

body.logged-in .nav-links .logged-out {
    display: none;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 1.5rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* 购物车样式 */
.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background-color: white;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.cart-item-price {
    color: #e44d26;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin: 0 1rem;
    background-color: #f5f5f5;
    padding: 0.25rem;
    border-radius: 4px;
}

.quantity-btn {
    padding: 0.25rem 0.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: #f0f0f0;
}

.quantity-input {
    width: 40px;
    text-align: center;
    margin: 0 0.5rem;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-item {
    color: #ff4444;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #cc0000;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-top: 1rem;
}

.total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e44d26;
}

.checkout-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 购物车样式 */
.cart-item-subtotal {
    color: #e44d26;
    font-weight: bold;
    margin: 0 1rem;
    min-width: 80px;
    text-align: right;
}

.cart-summary-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.total-items {
    color: #666;
    font-size: 0.9rem;
}

/* 订单列表样式 */
.empty-orders {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.order-item {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-number {
    font-weight: bold;
    color: #333;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.order-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.order-status.shipped {
    background-color: #d4edda;
    color: #155724;
}

.order-products {
    margin: 1rem 0;
}

.order-product {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-product:last-child {
    border-bottom: none;
}

.order-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 4px;
}

.order-product-info {
    flex: 1;
}

.order-product-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.order-product-price {
    display: flex;
    gap: 0.5rem;
    color: #666;
}

.order-product-price .price {
    color: #e44d26;
    font-weight: bold;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.order-address {
    color: #666;
    font-size: 0.9rem;
}

.order-address .label {
    color: #333;
    font-weight: bold;
}

.order-total {
    font-weight: bold;
}

.order-total .price {
    color: #e44d26;
    font-size: 1.1rem;
}

/* 商品表格样式 */
.products-table-container {
    overflow-x: auto;
    margin: 1rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.products-table th,
.products-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.products-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.products-table tbody tr {
    transition: all 0.3s ease;
}

.products-table tbody tr:hover {
    background-color: #f8f9fa;
}

.products-table td img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.products-table td img:hover {
    transform: scale(1.1);
}

.products-table .product-name {
    font-weight: 600;
    color: #2c3e50;
}

.products-table .product-description {
    color: #666;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.products-table .product-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2rem;
}

.products-table .product-action button {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.products-table .product-action button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
}

/* 响应式表格样式 */
@media screen and (max-width: 768px) {
    .products-table th:nth-child(3),
    .products-table td:nth-child(3) {
        display: none;
    }
    
    .products-table td img {
        width: 60px;
        height: 60px;
    }
    
    .products-table th,
    .products-table td {
        padding: 0.8rem;
    }
}

/* 秒杀活动样式 */
.flash-sale-section {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.flash-sale-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.flash-sale-title i {
    color: #e74c3c;
    font-size: 1.8rem;
}

.flash-sale-title span {
    font-size: 1.8rem;
    color: #e74c3c;
    font-weight: 600;
}

.flash-sale-countdown {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.countdown-label {
    color: #666;
    font-size: 1rem;
}

.countdown-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.time-block {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.time-separator {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: bold;
}

.flash-sale-content {
    position: relative;
}

.flash-sale-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.flash-sale-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.flash-sale-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.flash-sale-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.flash-sale-info {
    padding: 1.2rem;
}

.flash-sale-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-info {
    background-color: #f8f9fa;
    padding: 0.8rem;
    border-radius: 8px;
    margin: 0.8rem 0;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.flash-sale-price {
    font-size: 1.4rem;
    color: #e74c3c;
    font-weight: bold;
}

.stock-info {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.flash-sale-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flash-sale-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
}

.flash-sale-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.flash-sale-ended {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.flash-sale-progress {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #e74c3c;
    transition: width 0.3s ease;
}

/* 秒杀订单标记 */
.order-item[data-type="flash_sale"] .order-header {
    background-color: #fff3f3;
}

.order-item[data-type="flash_sale"] .order-header::before {
    content: "秒杀订单";
    background-color: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 8px;
}

/* 商品分类导航 */
.category-section {
    background-color: #fff;
    padding: 1rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#categoryList {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

#categoryList li a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#categoryList li a:hover {
    color: #ff6b6b;
    background-color: #fff5f5;
}

#categoryList li a.active {
    color: #ff6b6b;
    background-color: #fff5f5;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #categoryList {
        flex-wrap: wrap;
        gap: 1rem;
    }

    #categoryList li a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 浮动广告 */
.floating-ad {
    position: fixed;
    right: 20px;
    bottom: 180px;
    width: 200px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.floating-ad img {
    width: 100%;
    height: auto;
    display: block;
}

.floating-ad-content {
    padding: 15px;
}

.floating-ad-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.floating-ad-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.floating-ad-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #ff6b6b;
    color: white;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.floating-ad-btn:hover {
    background: #ff5252;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-ad {
        width: 150px;
        right: 10px;
        bottom: 100px;
    }
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background-color: #34495e;
}

/* 深色主题样式 */
body.dark-theme {
    background-color: #1a1a1a;
    color: #ecf0f1;
}

body.dark-theme .navbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
}

body.dark-theme .product-card,
body.dark-theme .modal-content,
body.dark-theme .cart-item,
body.dark-theme .order-item,
body.dark-theme .flash-sale-section,
body.dark-theme .category-section {
    background-color: #2c3e50;
    color: #ecf0f1;
}

body.dark-theme .product-card h3,
body.dark-theme .cart-item-title,
body.dark-theme .order-product-name {
    color: #ecf0f1;
}

body.dark-theme .product-card .price,
body.dark-theme .cart-item-price,
body.dark-theme .order-product-price .price {
    color: #e74c3c;
}

body.dark-theme .search-box input {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .search-box button {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .nav-links a {
    color: #ecf0f1;
}

body.dark-theme .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .modal {
    background-color: rgba(0, 0, 0, 0.8);
}

body.dark-theme .flash-sale-title i,
body.dark-theme .flash-sale-title span {
    color: #e74c3c;
}

body.dark-theme .flash-sale-price {
    color: #e74c3c;
}

body.dark-theme .original-price {
    color: #bdc3c7;
}

body.dark-theme .stock-info {
    color: #bdc3c7;
}

body.dark-theme .flash-sale-progress {
    background: #34495e;
}

body.dark-theme .progress-bar {
    background: #e74c3c;
}

body.dark-theme footer {
    background-color: #2c3e50;
    color: #ecf0f1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .theme-toggle {
        font-size: 1rem;
        padding: 0.4rem;
    }
}

/* 轮播图样式 */
.carousel-section {
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    text-align: left;
}

.carousel-caption h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.carousel-caption p {
    font-size: 1.2rem;
    margin: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 深色主题下的轮播图样式 */
body.dark-theme .carousel-container {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body.dark-theme .carousel-control {
    background: rgba(255,255,255,0.2);
}

body.dark-theme .carousel-control:hover {
    background: rgba(255,255,255,0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-container {
        height: 300px;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }

    .carousel-control {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

/* 图片放大功能样式 */
.image-zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.image-zoom-container img {
    transition: transform 0.3s ease;
}

.image-zoom-lens {
    position: absolute;
    border: 2px solid #fff;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: none;
    display: none;
}

.image-zoom-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    background-color: #fff;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.image-zoom-result img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.1);
}

.image-zoom-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1001;
}

/* 深色主题下的图片放大样式 */
body.dark-theme .image-zoom-result {
    background-color: #2c3e50;
    border-color: #34495e;
}

body.dark-theme .image-zoom-close {
    background: rgba(255,255,255,0.2);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .image-zoom-result {
        width: 500px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .image-zoom-result {
        width: 80vw;
        height: 80vw;
    }
}

/* 在线客服样式优化 */
.chat-modal .modal-content {
    max-width: 400px;
    height: 600px;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.chat-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chat-header h2 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h2 i {
    font-size: 1.4rem;
}

.chat-header .close {
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chat-header .close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 85%;
    padding: 1rem;
    border-radius: 15px;
    position: relative;
    animation: messageAppear 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-message.sent {
    background: #3498db;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    margin-left: 15%;
}

.chat-message.received {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    margin-right: 15%;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-content .sender {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 3px;
}

.message-content p {
    margin: 0;
    line-height: 1.4;
}

.chat-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.chat-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    background: white;
}

.send-button {
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.send-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.send-button i {
    font-size: 1.1rem;
}

/* 深色主题下的聊天样式 */
body.dark-theme .chat-modal .modal-content {
    background: #2c3e50;
}

body.dark-theme .chat-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body.dark-theme .chat-messages {
    background: #34495e;
}

body.dark-theme .chat-message.received {
    background: #2c3e50;
    color: #ecf0f1;
}

body.dark-theme .chat-input-container {
    background: #2c3e50;
    border-top-color: #34495e;
}

body.dark-theme .chat-input {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

body.dark-theme .chat-input:focus {
    background: #2c3e50;
    border-color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chat-modal .modal-content {
        max-width: 90vw;
        height: 80vh;
        margin: 10vh auto;
    }

    .chat-message {
        max-width: 90%;
    }

    .chat-input-container {
        padding: 0.8rem;
    }

    .send-button {
        padding: 0.8rem 1.2rem;
    }
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动文字公告栏样式 */
.announcement-bar {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 80px;
    z-index: 100;
    width: 100%;
}

.announcement-content {
    display: inline-block;
    white-space: nowrap;
    animation: scrollText 25s linear infinite;
    padding-left: 100%;
    width: max-content;
}

.announcement-content span {
    margin-right: 60px;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 深色主题下的公告栏样式 */
body.dark-theme .announcement-bar {
    background: linear-gradient(90deg, #2c3e50, #34495e);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .announcement-bar {
        padding: 10px 0;
        margin-top: 70px;
    }
    
    .announcement-content span {
        font-size: 0.95rem;
        margin-right: 40px;
    }
}

/* 商品详情页样式 */
.product-detail-content {
    max-width: 1000px;
    padding: 2rem;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-detail-gallery {
    position: relative;
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.05);
}

.thumbnail-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item.active {
    border-color: #3498db;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    padding: 1rem;
}

.product-detail-info h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.product-price {
    margin: 1.5rem 0;
}

.current-price {
    font-size: 2rem;
    color: #e74c3c;
    font-weight: bold;
    margin-right: 1rem;
}

.original-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.product-description {
    color: #666;
    line-height: 1.6;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-meta {
    margin: 1.5rem 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: #666;
}

.meta-item i {
    color: #3498db;
}

.product-actions {
    margin-top: 2rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #f8f9fa;
}

#detailQuantity {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-to-cart-btn,
.buy-now-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.add-to-cart-btn {
    background: #3498db;
    color: white;
}

.buy-now-btn {
    background: #e74c3c;
    color: white;
}

.add-to-cart-btn:hover {
    background: #2980b9;
}

.buy-now-btn:hover {
    background: #c0392b;
}

/* 深色主题下的商品详情样式 */
body.dark-theme .product-detail-content {
    background-color: #2c3e50;
    color: #ecf0f1;
}

body.dark-theme .product-detail-info h2 {
    color: #ecf0f1;
}

body.dark-theme .product-description {
    background: #34495e;
    color: #ecf0f1;
}

body.dark-theme .meta-item {
    color: #bdc3c7;
}

body.dark-theme .quantity-btn {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

body.dark-theme #detailQuantity {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .main-image {
        height: 300px;
    }

    .thumbnail-item {
        width: 60px;
        height: 60px;
    }

    .product-detail-info h2 {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 1.5rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    main {
        margin-top: 70px; /* 移动端导航栏高度较小，相应调整间距 */
        padding: 1rem;
    }
}

/* 购物车模态框样式 */
#cartModal .modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
}

.cart-items {
    padding: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 2fr 1fr 1fr 50px;
    gap: 20px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.cart-item-price {
    color: #ff6b6b;
    font-weight: 500;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-quantity input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-item-subtotal {
    font-weight: 500;
    color: #ff6b6b;
}

.remove-item {
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #ff6b6b;
}

.cart-summary {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.total-items {
    color: #666;
}

.total {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ff6b6b;
}

.checkout-btn {
    padding: 12px 30px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background: #ff5252;
}

.checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 深色主题下的购物车样式 */
body.dark-theme #cartModal .modal-content {
    background: #2c3e50;
    color: #fff;
}

body.dark-theme .cart-item {
    border-bottom-color: #34495e;
}

body.dark-theme .cart-item-quantity input {
    background: #34495e;
    border-color: #2c3e50;
    color: #fff;
}

body.dark-theme .cart-summary {
    background: #34495e;
    border-top-color: #2c3e50;
}

body.dark-theme .total-items {
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #cartModal .modal-content {
        width: 95%;
        margin: 10px;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .cart-item img {
        width: 80px;
        height: 80px;
    }

    .cart-item-info {
        grid-column: 2;
    }

    .cart-item-quantity {
        grid-column: 2;
        justify-content: flex-start;
    }

    .cart-item-subtotal {
        grid-column: 2;
    }

    .remove-item {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .cart-summary {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .cart-summary-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* 快捷回复样式 */
.quick-replies {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
}

.quick-reply-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.quick-reply-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-reply-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #3498db;
    border-radius: 20px;
    color: #3498db;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 深色主题下的快捷回复样式 */
body.dark-theme .quick-replies {
    background: rgba(52, 152, 219, 0.2);
}

body.dark-theme .quick-reply-title {
    color: #bdc3c7;
}

body.dark-theme .quick-reply-btn {
    background: #2c3e50;
    border-color: #3498db;
    color: #3498db;
}

body.dark-theme .quick-reply-btn:hover {
    background: #3498db;
    color: #ecf0f1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quick-reply-buttons {
        gap: 0.3rem;
    }

    .quick-reply-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* 在线客服按钮样式 */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.chat-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chat-button i {
    font-size: 1.2rem;
}

/* 深色主题下的客服图标样式 */
body.dark-theme .chat-button {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chat-button {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* 登录注册模态框样式 */
#loginModal .modal-content,
#registerModal .modal-content {
    max-width: 400px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#loginModal h2,
#registerModal h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
}

#loginForm,
#registerForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9rem;
}

#loginForm input,
#registerForm input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#loginForm input:focus,
#registerForm input:focus {
    border-color: #3498db;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#loginForm input::placeholder,
#registerForm input::placeholder {
    color: #999;
}

#loginForm button,
#registerForm button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#loginForm button:hover,
#registerForm button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #2980b9;
}

/* 暗色主题适配 */
[data-theme="dark"] #loginModal .modal-content,
[data-theme="dark"] #registerModal .modal-content {
    background: #2c3e50;
}

[data-theme="dark"] #loginModal h2,
[data-theme="dark"] #registerModal h2 {
    color: #ecf0f1;
}

[data-theme="dark"] #loginForm input,
[data-theme="dark"] #registerForm input {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

[data-theme="dark"] #loginForm input:focus,
[data-theme="dark"] #registerForm input:focus {
    border-color: #3498db;
    background: #2c3e50;
}

[data-theme="dark"] #loginForm input::placeholder,
[data-theme="dark"] #registerForm input::placeholder {
    color: #95a5a6;
}

[data-theme="dark"] .form-footer {
    color: #bdc3c7;
}

[data-theme="dark"] .form-footer a {
    color: #3498db;
}

[data-theme="dark"] .form-footer a:hover {
    color: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #loginModal .modal-content,
    #registerModal .modal-content {
        width: 90%;
        padding: 20px;
    }

    #loginModal h2,
    #registerModal h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    #loginForm input,
    #registerForm input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    #loginForm button,
    #registerForm button {
        padding: 10px;
        font-size: 1rem;
    }
}

/* 个人信息模态框样式 */
#profileModal .modal-content {
    max-width: 500px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#profileModal h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.profile-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.info-group {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-group label {
    min-width: 120px;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-group label i {
    color: #3498db;
    font-size: 1.1rem;
}

.info-group span {
    flex: 1;
    color: #2c3e50;
    font-size: 1rem;
    padding-left: 10px;
    border-left: 2px solid #eee;
}

.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.profile-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#editProfileBtn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

#changePasswordBtn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.profile-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-actions button i {
    font-size: 1.1rem;
}

/* 修改密码模态框样式 */
#changePasswordModal .modal-content {
    max-width: 500px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#changePasswordModal h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
}

#changePasswordForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#changePasswordForm .form-group {
    position: relative;
}

#changePasswordForm .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

#changePasswordForm .form-group label i {
    margin-right: 8px;
    color: #3498db;
}

#changePasswordForm .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#changePasswordForm .form-group input:focus {
    border-color: #3498db;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#changePasswordForm .form-group input::placeholder {
    color: #999;
}

#changePasswordForm button {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#changePasswordForm button:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#changePasswordForm button i {
    font-size: 1.1rem;
}

/* 暗色主题适配 */
[data-theme="dark"] #profileModal .modal-content,
[data-theme="dark"] #changePasswordModal .modal-content {
    background: #2c3e50;
}

[data-theme="dark"] #profileModal h2,
[data-theme="dark"] #changePasswordModal h2 {
    color: #ecf0f1;
}

[data-theme="dark"] .profile-info {
    background: #34495e;
}

[data-theme="dark"] .info-group {
    background: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .info-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .info-group label {
    color: #bdc3c7;
}

[data-theme="dark"] .info-group span {
    color: #ecf0f1;
    border-left-color: #34495e;
}

[data-theme="dark"] #changePasswordForm .form-group label {
    color: #bdc3c7;
}

[data-theme="dark"] #changePasswordForm .form-group input {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

[data-theme="dark"] #changePasswordForm .form-group input:focus {
    border-color: #3498db;
    background: #2c3e50;
}

[data-theme="dark"] #changePasswordForm .form-group input::placeholder {
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #profileModal .modal-content,
    #changePasswordModal .modal-content {
        width: 90%;
        padding: 20px;
    }

    #profileModal h2,
    #changePasswordModal h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .info-group {
        padding: 12px;
    }

    .info-group label {
        min-width: 100px;
        font-size: 0.9rem;
    }

    .info-group span {
        font-size: 0.95rem;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions button {
        width: 100%;
        padding: 10px;
    }

    #changePasswordForm .form-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    #changePasswordForm button {
        padding: 10px;
        font-size: 1rem;
    }
}

/* 个人信息页面样式 */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #3498db;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-welcome {
    flex: 1;
}

.profile-welcome h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-welcome p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.profile-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.profile-sidebar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.profile-menu {
    list-style: none;
    padding: 0;
}

.profile-menu li {
    margin-bottom: 0.5rem;
}

.profile-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-menu a:hover,
.profile-menu a.active {
    background: #f8f9fa;
    color: #3498db;
}

.profile-menu a i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.profile-main {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-card-header i {
    font-size: 1.5rem;
    color: #3498db;
}

.info-card-header h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
}

.info-card-content {
    color: #666;
}

.info-card-content p {
    margin: 0.5rem 0;
}

.info-card-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.info-card-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.edit-btn {
    background: #3498db;
    color: white;
}

.edit-btn:hover {
    background: #2980b9;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
}

/* 修改个人信息页面样式 */
.edit-profile-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.save-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cancel-btn {
    background: #f1f1f1;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 暗色主题适配 */
[data-theme="dark"] .profile-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-theme="dark"] .profile-avatar {
    background: #34495e;
    color: #3498db;
}

[data-theme="dark"] .profile-sidebar,
[data-theme="dark"] .profile-main {
    background: #2c3e50;
}

[data-theme="dark"] .profile-menu a {
    color: #bdc3c7;
}

[data-theme="dark"] .profile-menu a:hover,
[data-theme="dark"] .profile-menu a.active {
    background: #34495e;
    color: #3498db;
}

[data-theme="dark"] .profile-section h2 {
    color: #ecf0f1;
    border-bottom-color: #34495e;
}

[data-theme="dark"] .info-card {
    background: #34495e;
}

[data-theme="dark"] .info-card-header h3 {
    color: #ecf0f1;
}

[data-theme="dark"] .info-card-content {
    color: #bdc3c7;
}

[data-theme="dark"] .form-section {
    background: #34495e;
}

[data-theme="dark"] .form-section h3 {
    color: #ecf0f1;
}

[data-theme="dark"] .form-group label {
    color: #bdc3c7;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background: #2c3e50;
    border-color: #34495e;
    color: #ecf0f1;
}

[data-theme="dark"] .cancel-btn {
    background: #34495e;
    color: #bdc3c7;
}

[data-theme="dark"] .cancel-btn:hover {
    background: #2c3e50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .profile-content {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        margin-bottom: 1rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* 修改个人信息模态框样式 */
#editProfileModal .modal-content {
    max-width: 500px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#editProfileModal h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

#editProfileModal h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 3px;
}

#editProfileForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#editProfileForm .form-group {
    position: relative;
}

#editProfileForm .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

#editProfileForm .form-group label i {
    color: #3498db;
    font-size: 1.1rem;
}

#editProfileForm .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#editProfileForm .form-group input:focus {
    border-color: #3498db;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#editProfileForm .form-group input::placeholder {
    color: #999;
}

#editProfileForm .form-group input[readonly] {
    background: #f1f1f1;
    cursor: not-allowed;
    border-color: #ddd;
}

#editProfileForm button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#editProfileForm button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#editProfileForm button i {
    font-size: 1.1rem;
}

/* 暗色主题适配 */
[data-theme="dark"] #editProfileModal .modal-content {
    background: #2c3e50;
}

[data-theme="dark"] #editProfileModal h2 {
    color: #ecf0f1;
}

[data-theme="dark"] #editProfileForm .form-group label {
    color: #bdc3c7;
}

[data-theme="dark"] #editProfileForm .form-group input {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

[data-theme="dark"] #editProfileForm .form-group input:focus {
    border-color: #3498db;
    background: #2c3e50;
}

[data-theme="dark"] #editProfileForm .form-group input::placeholder {
    color: #95a5a6;
}

[data-theme="dark"] #editProfileForm .form-group input[readonly] {
    background: #2c3e50;
    border-color: #34495e;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #editProfileModal .modal-content {
        width: 90%;
        padding: 20px;
    }

    #editProfileModal h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    #editProfileForm .form-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    #editProfileForm button {
        padding: 10px;
        font-size: 1rem;
    }
} 